package com.ts.main.mini.context;


import com.ts.main.mini.vo.UserVo;

/**
 * 用户数据缓存器
 * @author lk
 */
public class UserContext {

  private static final ThreadLocal<UserVo> userHolder = new ThreadLocal<UserVo>();

  public static void setUser(UserVo user) {
    userHolder.set(user);
  }

  public static UserVo getUser() {
    return userHolder.get();
  }

  public static void clearUser() {
    userHolder.remove();
  }
}

